package edu.lingnan.librarymanage.repository;

import edu.lingnan.librarymanage.core.bean.Book;
import edu.lingnan.librarymanage.core.bean.BookItem;
import edu.lingnan.librarymanage.core.bean.Borrow;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author cql
 */
@Repository
public interface BookItemRepository extends JpaRepository<BookItem, Integer>, JpaSpecificationExecutor<Book> {

    /**
     * 根据书本id查找该书籍在图书馆所有的位置
     *
     * @param bookId
     * @return
     */
    List<BookItem> findByBookId(Integer bookId);
}
